package com.funo.ehealth.main;

import com.funo.ehealth.thread.BussinessThreadGroup;
import com.funo.ehealth.thread.CPMsgReadThread;
import com.funo.ehealth.thread.CPMsgThread;
import com.funo.ehealth.thread.CPOrderReadThread;
import com.funo.ehealth.thread.CPOrderThread;
import com.funo.ehealth.thread.VGOPOrderReadThread;
import com.funo.ehealth.thread.VGOPOrderThread;
import com.funo.ehealth.thread.VGOPUnorderReadThread;
import com.funo.ehealth.thread.VGOPUnorderThread;

public class ThreadMgr {
	
	/**
	 * 线程组
	 */
	public static BussinessThreadGroup threadGroup = new BussinessThreadGroup("bussiness thread group");
	/**
	 * CP上行信息同步线程
	 */
	public static CPMsgThread cpMsgThread = new CPMsgThread(threadGroup, "business cpMsgThread");
	/**
	 * CP订购关系同步线程
	 */
	public static CPOrderThread cpOrderThread = new CPOrderThread(threadGroup, "business cpOrderThread");
	/**
	 * VGOP订购关系同步线程
	 */
	public static VGOPOrderThread vgopOrderThread = new VGOPOrderThread(threadGroup, "business vgopOrderThread");
	/**
	 * VGOP退订关系同步线程
	 */
	public static VGOPUnorderThread vgopUnorderThread = new VGOPUnorderThread(threadGroup, "business vgopUnorderThread");
	/**
	 * CP上行信息读取线程
	 */
	public static CPMsgReadThread cpMsgReadThread = new CPMsgReadThread(threadGroup, "business cpMsgReadThread");
	/**
	 * CP订购关系同步信息读取线程
	 */
	public static CPOrderReadThread cpOrderReadThread = new CPOrderReadThread(threadGroup, "business cpOrderReadThread");
	/**
	 * VGOP订购关系同步信息读取线程
	 */
	public static VGOPOrderReadThread vgopOrderReadThread = new VGOPOrderReadThread(threadGroup, "business vgopOrderReadThread");
	/**
	 * VGOP退订关系同步信息读取线程
	 */
	public static VGOPUnorderReadThread vgopUnorderReadThread = new VGOPUnorderReadThread(threadGroup, "business vgopUnorderReadThread");

	/**
	 * 启动各线程 
	 */
	public static void startThreads(){
		
		cpOrderReadThread.start();
		
//		cpMsgReadThread.start();
//		
//		vgopOrderReadThread.start();
//		
//		vgopUnorderReadThread.start();
		
		cpOrderThread.start();
		
//		cpMsgThread.start();
//		
//		vgopOrderThread.start();
//		
//		vgopUnorderThread.start();
		
	}
}
